<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
    <title>搞事情</title>
    <link rel="shortcut icon" href="#" type="image/x-icon">
    <link rel='dns-prefetch' href='//apps.bdimg.com' />
    <link rel='dns-prefetch' href='//s.w.org' />
    <link href="/static/boot/css/bootstrap.min.css" rel="stylesheet">
    <link rel='stylesheet' id='style-css'  href='/static/index/css/style.css' type='text/css' media='all' />
    <link rel='stylesheet' id='style-css'  href='/static/index/css/mycss.css' type='text/css' media='all' />
    <link rel='stylesheet' id='owlcss-css'  href='/static/index/css/owl.carousel.min.css' type='text/css' media='all' />
    
    <!-- 个人中心 -->
    <link rel="stylesheet" type="text/css" href="/static/index/user/Css/icon.css" />
    <link href="/static/index/user/Css/common.css" rel="stylesheet" type="text/css" />
    <link href="/static/index/user/Css/link.css" rel="stylesheet" type="text/css" />
    <link href="/static/index/user/Css/style.css" rel="stylesheet" type="text/css" />
    <link href="/static/index/user/Css/user.css" rel="stylesheet" type="text/css" />
    <link href="/static/index/user/Css/register.css" rel="stylesheet" type="text/css" />
    <script src="/static/index/user/Scripts/plug-in_module.js" type="text/javascript"></script>
    <script type="text/javascript" src="/static/index/user/Scripts/compatibility.js"></script>
    <script src="/static/admin/js/jquery-2.1.4.min.js"></script>
    <script src="/static/admin/js/bootstrap.min.js"></script>
    <style>
        .container{
            width: 1110px!important;
        }


    </style>

</head>
<body class="home blog">
<header id="header">
    <nav class="container">
        <div class="logo hidden-sm">
            <a href="/index/index" class="d-block">
                <img src="/static/index/img/gsq.png" alt="">
            </a>
        </div>
        <div class="mobile-logo show-sm">
            <a href="/index/index" class="d-inline-block">
                <img src="/static/index/img/gsq.png" alt="">
            </a>
        </div>
        <div class="header-menu-wrap clear">
            <ul id="menu-%e5%af%bc%e8%88%aa%e8%8f%9c%e5%8d%95" class="header-menu">
                {volist name="channel" id="v" }
                <li id="menu-item-52" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-52">
                    <a href="/index/index/list/id/{$v.id}">{$v.Name}</a>
                </li>
                {/volist}
            </ul>
            </div>
            <div class="admin-login hidden-sm">
                <a href="/index/login" class="btn-line btn-line-geek">登录</a>
                <a href="/index/login" class="btn-line btn-line-geek">注册</a>
            </div>
        <div class="search-button cursor-pointer">
            <i class="czs-search-l"></i>
            <span class="d-inline-block transition opacity-0"><i class="czs-close-l"></i></span>
        </div>
        <div class="menu-button">
            <div class="nav-bar">
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>
    </nav>
    <div class="menu-wrap show-xs">
        <div class="mobile-menu">
            <ul id="menu-%e5%af%bc%e8%88%aa%e8%8f%9c%e5%8d%95-1" class="mobile-menu-nav">
            {volist name="channel" id="v" }
                <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-51"><a href="#">{$v.Name}</a>
                </li>
            {/volist}
            </ul>
        </div>
        <div class="mobile-admin-login text-center mt-3">
            <a href="/index/login" class="btn-line btn-line-geek">登录</a>
            <a href="/index/login/zhuce" class="btn-line btn-line-geek">注册</a>
        </div>
    </div>
</header>
<div class="search-wrap transition">
    <div class="container">
        <div class="row">
            <form role="search" method="get" action="" class="header-search">
                <input data-url="Q0JPT0I=" type="search" name="s" title="Search" placeholder="搜索..." value="">
            </form>
        </div>
    </div>
</div>

<body>


<div class="aw-register-box">
        <h1>登陆账号</h1>
    <div class="mod-body">
        <form class="aw-register-form" action="/index/login/dologin" method="post" id="register_form">
            <ul>
                <li class="alert alert-danger hide error_message text-left">
                    <i class="icon icon-delete"></i>
                    <em></em>
                </li>
                <li>
                    <input class="aw-register-name form-control" type="text" name="name" placeholder="用户名/邮箱/手机号" tips="请输入一个 2-14 位的用户名" errortips="用户名长度不符合" value="" />
                </li>
                <li>
                    <input class="aw-register-pwd form-control" type="password" name="pwd" placeholder="密码" tips="请输入 6-16 个字符,区分大小写" errortips="密码不符合规则" />
                </li>
                <li>
                    <input class="aw-register-pwd form-control" type="password" name="code" placeholder="验证码" tips="请输入 6-16 个字符,区分大小写" errortips="密码不符合规则" />
                </li>
               
                <li class="last">
                    <a href="/index/login/zhuce" class="pull-right">前往注册</a>
                    <div class="aw-regiter-agreement hide">
                        <div class="aw-register-agreement-txt" id="register_agreement"></div>
                    </div>
                </li>
                <li class="clearfix">
                    <button class="btn btn-large btn-blue btn-block" onclick="AWS.ajax_post($('#register_form'), AWS.ajax_processer, 'error_message'); return false;">登录</button>
                </li>
            </ul>
        </form>
    </div>
    <div class="mod-footer"></div>
</div>

<script type="text/javascript">


$(document).ready(function() {

        $('.aw-agreement-btn').click(function() {
            if ($('.aw-regiter-agreement').is(':visible')) {
                $('.aw-regiter-agreement').hide();
            } else {
                $('.aw-regiter-agreement').show();
            }
        });

        $('.more-information-btn').click(function() {
            $('.more-information').fadeIn();
            $(this).parent().hide();
        });

        verify_register_form('#register_form');

        /* 注册页面验证 */
        function verify_register_form(element) {
            $(element).find('[type=text], [type=password]').on({
                focus: function() {
                    if (typeof $(this).attr('tips') != 'undefined' && $(this).attr('tips') != '') {
                        $(this).parent().append('<span class="aw-reg-tips">' + $(this).attr('tips') + '</span>');
                    }
                },
                blur: function() {
                    if ($(this).attr('tips') != '') {
                        switch ($(this).attr('name')) {
                        case 'user_name':
                            var _this = $(this);
                            $(this).parent().find('.aw-reg-tips').detach();
                            if ($(this).val().length >= 0 && $(this).val().length < 2) {
                                $(this).parent().find('.aw-reg-tips').detach();
                                $(this).parent().append('<span class="aw-reg-tips aw-reg-err"><i class="aw-icon i-err"></i>' + $(this).attr('errortips') + '</span>');
                                return;
                            }
                            if ($(this).val().length > 17) {
                                $(this).parent().find('.aw-reg-tips').detach();
                                $(this).parent().append('<span class="aw-reg-tips aw-reg-err"><i class="aw-icon i-err"></i>' + $(this).attr('errortips') + '</span>');
                                return;
                            } else {
                                $.get(G_BASE_URL + '/account/ajax/check_username/username' + '-' + encodeURIComponent($(this).val()),
                                function(result) {
                                    if (result.errno == -1) {
                                        _this.parent().find('.aw-reg-tips').detach();
                                        _this.parent().append('<span class="aw-reg-tips aw-reg-err"><i class="aw-icon i-err"></i>' + result.err + '</span>');
                                    } else {
                                        _this.parent().find('.aw-reg-tips').detach();
                                        _this.parent().append('<span class="aw-reg-tips aw-reg-right"><i class="aw-icon i-followed"></i></span>');
                                    }
                                },
                                'json');
                            }
                            return;

                        case 'email':
                            $(this).parent().find('.aw-reg-tips').detach();
                            var emailreg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
                            if (!emailreg.test($(this).val())) {
                                $(this).parent().find('.aw-reg-tips').detach();
                                $(this).parent().append('<span class="aw-reg-tips aw-reg-err"><i class="aw-icon i-err"></i>' + $(this).attr('errortips') + '</span>');
                                return;
                            } else {
                                $(this).parent().find('.aw-reg-tips').detach();
                                $(this).parent().append('<span class="aw-reg-tips aw-reg-right"><i class="aw-icon i-followed"></i></span>');
                            }
                            return;

                        case 'password':
                            $(this).parent().find('.aw-reg-tips').detach();
                            if ($(this).val().length >= 0 && $(this).val().length < 6) {
                                $(this).parent().find('.aw-reg-tips').detach();
                                $(this).parent().append('<span class="aw-reg-tips aw-reg-err"><i class="aw-icon i-err"></i>' + $(this).attr('errortips') + '</span>');
                                return;
                            }
                            if ($(this).val().length > 17) {
                                $(this).parent().find('.aw-reg-tips').detach();
                                $(this).parent().append('<span class="aw-reg-tips aw-reg-err"><i class="aw-icon i-err"></i>' + $(this).attr('errortips') + '</span>');
                                return;
                            } else {
                                $(this).parent().find('.aw-reg-tips').detach();
                                $(this).parent().append('<span class="aw-reg-tips aw-reg-right"><i class="aw-icon i-followed"></i></span>');
                            }
                            return;
                        }
                    }
                }
            });
        }

        
    });


</script>

</body>
</html>